import java.util.Scanner;

/**
 * @author vivi
 * @description
 * @date 2024/5/23
 */
public class demo1 {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);

        char[] s = scanner.next().toCharArray();

        int sum = 0; // 总和
        int n = s.length;
        int count = 1;

        for (int i = 0; i < n; i++) {
            if (s[i] >= '0' && s[i] <= '9') {
                sum += (s[i] - '0') * count;
                count++;
            }
        }

        sum %= 11;

        if (sum == s[n-1] - '0' || sum == 10 && s[n-1] == 'X') {
            System.out.println("Right");
        }else {
            s[n-1] = sum == 10 ? 'X' : (char)(sum + '0');
            for (int i = 0; i < n; i++) {
                System.out.println(s[i]);
            }
        }
    }
}
